/*
 * @(#)ConvertDFNToICN.java
 * Date 2014-01-20
 * Version 1.0
 * Author Jim Horner
 * Copyright (c)2012
 */


package com.chrisuyehara.vista.rpc.procedures.VAFC;

import com.chrisuyehara.vista.rpc.parameters.LiteralParameter;

import com.chrisuyehara.vista.rpc.procedures.AbstractRemoteProcedure;

import org.apache.commons.lang3.StringUtils;


/**
 * Class description
 *
 *
 * @version        v1.0, 2014-01-20
 * @author         Jim Horner
 */
public class ConvertDFNToICN extends AbstractRemoteProcedure {

    /**
     * Constructs ...
     *
     *
     * @param dfn
     */
    public ConvertDFNToICN(String dfn) {

        super("VAFCTFU CONVERT DFN TO ICN");
        addParameter(new LiteralParameter(dfn));
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public String getICN() {

        String result = null;

        String resp = getResponse();

        if (StringUtils.isNotBlank(resp) && (resp.startsWith("-1") == false)) {
            result = resp;
        }

        return result;
    }
}
